package tests
{
	import com.imcrl.performance.ISuitTest;
	
	import flash.utils.getTimer;
	import flash.utils.setInterval;
	import flash.utils.setTimeout;

	public class TestList implements ISuitTest
	{
		private var list:Vector.<Object>;
		public function TestList()
		{
			list=new Vector.<Object>();
			
			
			setInterval(tttt,2000);
		}
		
		private function tttt():void{
			var loops:int=loop;
			var i:uint=0;
			var t:int;
			
			t=getTimer();
			for (i=0;i<loops;i++) {
				if(list.length){
					
					for each(var item:Object in list){
						
					}
				}
			}
			trace(getTimer()-t,"a");
			
		}
		
		public function get loop():int{
			return 1000000;
		}
		
		
		public function test_has():void{
			
			if(list.length){
				
				for each(var item:Object in list){
					
				}
			}
			
		}
		
		/*public function test_no():void{
			
			//if(list.length){
				
				for each(var item:Object in list){
					
				}
			//}
			
		}*/
	}
}